// @ts-ignore
/* eslint-disable */

/**
 * 该文件为 @umijs/openapi 插件自动生成，请勿随意修改。如需修改请通过配置 openapi.config.ts 进行定制化。
 * */

import { request, type RequestOptions } from '@/utils/request';

export async function recordPage (
  params: API.CheckPageParams,
  options?: RequestOptions,
) {
  return request<API.ClassesItem>('/check/record/page', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: params,
    ...(options || {}),
  });
}

// class list
export async function classList (
  params: API.ClassesPageParams,
  options?: RequestOptions,
) {
  return request<API.ClassesItem>('/student/classes/list', {
    method: 'GET',
    params: {
      ...params,
    },
   ...(options || {}),
  });
}

// course page
export async function coursePage (
  params: API.CoursePageParams,
  options?: RequestOptions,
) {
  return request<API.CourseItem>('/course/page', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: params,
   ...(options || {}),
  });
}

// leave page
export async function leavePage (
  params: API.CoursePageParams,
  options?: RequestOptions,
) {
  return request<API.CourseItem>('/leave/page', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: params,
   ...(options || {}),
  });
}

// recordDelete
export async function recordDelete (
  params: API.CheckItem,
  options?: RequestOptions,
) {
  return request<API.ClassesItem>('/check/remove', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: params,
   ...(options || {}),
  });
}

// change status
export async function changeStatus (
  params: API.CheckItem,
  options?: RequestOptions,
) {
  return request<API.ClassesItem>('/check/changeStatus', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: params,
  ...(options || {}),
  });
}

// leave audit
export async function leaveAudit (
  params: API.CheckItem,
  options?: RequestOptions,
) {
  return request<API.ClassesItem>('/leave/audit', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: params,
  ...(options || {}),
  });
}

